import { reactive, onMounted } from "vue";

export const useMouse = () => {
  const mouse = reactive({
    x: 0,
    y: 0,
  });

  onMounted(() => {
    window.addEventListener("mousemove", (e) => {
      mouse.x = e.clientX;
      mouse.y = e.clientY;
    });
  });

  return {
    mouse,
  };
};
